﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Windows.Media;

namespace MonitorManager
{
    public class ListBindData : INotifyPropertyChanged
    {
        public ListBindData()
        {

        }

        private ImageSource itemPic;
        private Stretch strethmethod = Stretch.Uniform;

        /// <summary>
        /// 素材展示预览图
        /// </summary>
        public ImageSource ItemPic
        {
            get
            {
                return itemPic;
            }
            set
            {
                if (itemPic != value)
                {
                    itemPic = value;
                    OnPropertyChanged("ItemPic");
                }
            }
        }

        public Stretch StrethMethod
        {
            get
            {
                return strethmethod;
            }
            set
            {
                if (strethmethod != value)
                {
                    strethmethod = value;
                    OnPropertyChanged("StrethMethod");
                }
            }
        }

        /// <summary>
        /// 图片名称
        /// </summary>
        public string ItemName
        {
            get;
            set;
        }

        /// <summary>
        /// 图片的本地路径
        /// </summary>
        public string ItemPath
        {
            get;
            set;
        }

        /// <summary>
        /// 图片的宽
        /// </summary>
        public int ItemWidth
        {
            get;
            set;
        }

        /// <summary>
        /// 图片的高
        /// </summary>
        public int ItemHeight
        {
            get;
            set;
        }

        private void OnPropertyChanged(string info)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(info));
            }
        }
        public event PropertyChangedEventHandler PropertyChanged;
    }
}
